
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>支付宝声波支付 · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../../../../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../../../../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../../../../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../../../../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../../../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="../alipay-coupon.html" />
    
    
    <link rel="prev" href="alipay-barPay.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../../../../">
            
                <a href="../../../../">
            
                    
                    项目导航
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../../../contact.html">
            
                <a href="../../../contact.html">
            
                    
                    联系方式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../../../study.html">
            
                <a href="../../../study.html">
            
                    
                    学习资料
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../../../gitchat.html">
            
                <a href="../../../gitchat.html">
            
                    
                    GitChat交流
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../../../blog/">
            
                <a href="../../../blog/">
            
                    
                    我的博客
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="../../../opensource/">
            
                <a href="../../../opensource/">
            
                    
                    开源项目
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="../../../opensource/IJPay.html">
            
                <a href="../../../opensource/IJPay.html">
            
                    
                    What is a IJPay?
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="../../../opensource/JPay.html">
            
                <a href="../../../opensource/JPay.html">
            
                    
                    Android支付SDK-JPay
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.3" data-path="../../../opensource/weixin_guide.html">
            
                <a href="../../../opensource/weixin_guide.html">
            
                    
                    极速开发微信公众号
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="../../">
            
                <a href="../../">
            
                    
                    IJPay 文档
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="../../../IJPay-Demo.html">
            
                <a href="../../../IJPay-Demo.html">
            
                    
                    IJPay-Demo
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" data-path="../">
            
                <a href="../">
            
                    
                    支付宝支付
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.2.1" data-path="../alipay-config.html">
            
                <a href="../alipay-config.html">
            
                    
                    配置应用环境
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2.2" data-path="../alipay-init.html">
            
                <a href="../alipay-init.html">
            
                    
                    IJPay 支付宝初始化
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2.3" data-path="../alipay-wap.html">
            
                <a href="../alipay-wap.html">
            
                    
                    支付宝手机网站支付
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2.4" data-path="../alipay-pc.html">
            
                <a href="../alipay-pc.html">
            
                    
                    支付宝电脑网站支付
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2.5" data-path="../alipay-offline.html">
            
                <a href="../alipay-offline.html">
            
                    
                    当面付
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.2.5.1" data-path="alipay-qrPay.html">
            
                <a href="alipay-qrPay.html">
            
                    
                    支付宝扫码支付
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2.5.2" data-path="alipay-barPay.html">
            
                <a href="alipay-barPay.html">
            
                    
                    支付宝条码支付
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.7.2.5.3" data-path="alipay-wavePay.html">
            
                <a href="alipay-wavePay.html">
            
                    
                    支付宝声波支付
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7.2.6" data-path="../alipay-coupon.html">
            
                <a href="../alipay-coupon.html">
            
                    
                    支付宝红包
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2.7" data-path="../alipay-transfer.html">
            
                <a href="../alipay-transfer.html">
            
                    
                    支付宝提现
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2.8" data-path="../alipay-app.html">
            
                <a href="../alipay-app.html">
            
                    
                    支付宝APP支付
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2.9" data-path="../alipay-notify.html">
            
                <a href="../alipay-notify.html">
            
                    
                    支付宝服务端异步通知
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2.10" data-path="../alipay-api.html">
            
                <a href="../alipay-api.html">
            
                    
                    支付宝API字典
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7.3" data-path="../../wxpay/">
            
                <a href="../../wxpay/">
            
                    
                    微信支付
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.3.1" data-path="../../wxpay/wxapi.html">
            
                <a href="../../wxpay/wxapi.html">
            
                    
                    微信公用API
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.2" data-path="../../wxpay/allapi.html">
            
                <a href="../../wxpay/allapi.html">
            
                    
                    微信支付API接口
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.3" data-path="../../wxpay/micropay.html">
            
                <a href="../../wxpay/micropay.html">
            
                    
                    微信刷卡支付
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.4" data-path="../../wxpay/wechatPay.html">
            
                <a href="../../wxpay/wechatPay.html">
            
                    
                    微信公众号支付
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.5" data-path="../../wxpay/qrPay.html">
            
                <a href="../../wxpay/qrPay.html">
            
                    
                    微信扫码支付
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.6" data-path="../../wxpay/appPay.html">
            
                <a href="../../wxpay/appPay.html">
            
                    
                    微信APP支付
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.7" data-path="../../wxpay/H5.html">
            
                <a href="../../wxpay/H5.html">
            
                    
                    微信H5支付
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.8" data-path="../../wxpay/wxapp.html">
            
                <a href="../../wxpay/wxapp.html">
            
                    
                    微信小程序支付
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.9" data-path="../../wxpay/redpack.html">
            
                <a href="../../wxpay/redpack.html">
            
                    
                    微信现金红包
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.10" data-path="../../wxpay/transfers.html">
            
                <a href="../../wxpay/transfers.html">
            
                    
                    微信企业付款
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.11" data-path="../../wxpay/refund.html">
            
                <a href="../../wxpay/refund.html">
            
                    
                    微信退款
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.12" data-path="../../wxpay/wxpay-notify.html">
            
                <a href="../../wxpay/wxpay-notify.html">
            
                    
                    服务端异步通知
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../../../.." >支付宝声波支付</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="&#x652F;&#x4ED8;&#x5B9D;&#x58F0;&#x6CE2;&#x652F;&#x4ED8;">&#x652F;&#x4ED8;&#x5B9D;&#x58F0;&#x6CE2;&#x652F;&#x4ED8;</h1>
<p>&#x6C99;&#x7BB1;&#x73AF;&#x5883;&#x4E0B;&#x53EF;&#x4EE5;&#x76F4;&#x63A5;&#x4E0B;&#x8F7D;&#x6C99;&#x7BB1;&#x73AF;&#x5883;&#x7684;APP&#x8FDB;&#x884C;&#x6D4B;&#x8BD5;&#xFF0C;<code>authCode</code>&#x5C31;&#x662F;&#x652F;&#x4ED8;&#x5B9D;&#x5BA2;&#x6237;&#x7AEF;<code>&#x4ED8;&#x94B1;</code>&#x4E2D;&#x6761;&#x7801;&#x4E0B;&#x7684;&#x4E00;&#x7A9C;&#x6570;&#x5B57;&#x3002;<a href="https://auth.alipay.com/login/ant_sso_index.htm?goto=https%3A%2F%2Fopenhome.alipay.com%2Fplatform%2FappDaily.htm%3Ftab%3Dtool" target="_blank">APP&#x4E0B;&#x8F7D;-&#x6C99;&#x7BB1;&#x5DE5;&#x5177;</a></p>
<h3 id="ijpay-&#x63A5;&#x53E3;">IJPay &#x63A5;&#x53E3;</h3>
<p>&#x8BE6;&#x89C1;&#x6761;&#x7801;&#x652F;&#x4ED8;&#x4E2D;&#x7684;IJPay&#x63A5;&#x53E3;</p>
<h3 id="&#x4EE3;&#x7801;&#x793A;&#x4F8B;">&#x4EE3;&#x7801;&#x793A;&#x4F8B;</h3>
<p><a href="https://github.com/Javen205/IJPay-Demo" target="_blank">https://github.com/Javen205/IJPay-Demo</a></p>
<pre><code>    /**
     * &#x58F0;&#x6CE2;&#x652F;&#x4ED8;
     */
    public void tradeWavePay() {
        String authCode = getPara(&quot;auth_code&quot;);
        String subject = &quot;Javen &#x652F;&#x4ED8;&#x5B9D;&#x58F0;&#x6CE2;&#x652F;&#x4ED8;&#x6D4B;&#x8BD5;&quot;;
        String totalAmount = &quot;100&quot;;
        String notifyUrl = notify_domain + &quot;/alipay/notify_url&quot;;

        AlipayTradePayModel model = new AlipayTradePayModel();
        model.setAuthCode(authCode);
        model.setSubject(subject);
        model.setTotalAmount(totalAmount);
        model.setOutTradeNo(StringUtils.getOutTradeNo());
        model.setScene(&quot;wave_code&quot;);
        try {
            String resultStr = AliPayApi.tradePay(model,notifyUrl);
            renderText(resultStr);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
</code></pre><pre><code>    /**
     * &#x58F0;&#x6CE2;&#x652F;&#x4ED8;
     */
    @RequestMapping(value =&quot;/tradeWavePay&quot;)
    @ResponseBody
    public String tradeWavePay(@RequestParam(&quot;auth_code&quot;) String authCode) {
        String subject = &quot;Javen &#x652F;&#x4ED8;&#x5B9D;&#x58F0;&#x6CE2;&#x652F;&#x4ED8;&#x6D4B;&#x8BD5;&quot;;
        String totalAmount = &quot;100&quot;;
        String notifyUrl = aliPayBean.getDomain() + &quot;/alipay/notify_url&quot;;

        AlipayTradePayModel model = new AlipayTradePayModel();
        model.setAuthCode(authCode);
        model.setSubject(subject);
        model.setTotalAmount(totalAmount);
        model.setOutTradeNo(StringUtils.getOutTradeNo());
        model.setScene(&quot;wave_code&quot;);
        try {
            return AliPayApi.tradePay(model,notifyUrl);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return  null;
    }
</code></pre>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="alipay-barPay.html" class="navigation navigation-prev " aria-label="Previous page: 支付宝条码支付">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="../alipay-coupon.html" class="navigation navigation-next " aria-label="Next page: 支付宝红包">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"支付宝声波支付","level":"1.7.2.5.3","depth":4,"next":{"title":"支付宝红包","level":"1.7.2.6","depth":3,"path":"doc/ijpay/alipay/alipay-coupon.md","ref":"doc/ijpay/alipay/alipay-coupon.md","articles":[]},"previous":{"title":"支付宝条码支付","level":"1.7.2.5.2","depth":4,"path":"doc/ijpay/alipay/alipay-offline/alipay-barPay.md","ref":"doc/ijpay/alipay/alipay-offline/alipay-barPay.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":[],"pluginsConfig":{"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"doc/ijpay/alipay/alipay-offline/alipay-wavePay.md","mtime":"2018-09-07T06:36:36.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-03-27T03:48:47.613Z"},"basePath":"../../../..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../../../../gitbook/gitbook.js"></script>
    <script src="../../../../gitbook/theme.js"></script>
    
        
        <script src="../../../../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../../../../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../../../../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../../../../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../../../../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../../../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

